<?php

namespace Home\Controller; 
use Common\Controller\CommonController; 

class TestController extends CommonController {
	
	public function index()
    {
		$this->success('新增成功',U('test/index1',['name'=>"kklasldlksadlkas"]));
    }
	
	public function index1()
    {
		
		//实例化User模型
		$User = M('rbac_node');
		//执行其他的数据操作
		$User->select();
		var_dump($User->select());
		 // 模板变量赋值
        $this->assign('name','ThinkPHP');
        $this->assign('email','thinkphp@qq.com');
		$this->display("index",['sss'=>'sasasa']);
    }
	
	public function _empty($name)
    {
        //把所有城市的操作解析到city方法
        return $this->showCity($name);
    }
	protected function showCity($name)
    {
        //和$name这个城市相关的处理
         echo '当前城市' . $name;
    }
}